package ui.util;

import java.awt.Dimension;
import java.awt.Point;
import java.awt.Toolkit;

public class YPUIUtil {
	
	public static int getScreenWidth() {
		Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
		return screenSize.width;
	}
	public static int getScreenHeight() {
		Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
		return screenSize.height;
	}
	public static Dimension getScreenSize() {
		return Toolkit.getDefaultToolkit().getScreenSize();
	}
	public static Point getCenterLocation(Dimension size) {
		int x = (YPUIUtil.getScreenWidth() - size.width) / 2;
		int y = (YPUIUtil.getScreenHeight() - size.height) / 2;
		return new Point(x, y);
	}
}
